<template>
  <div class="img-process_wrapper">
    <h3>图片工具集</h3>
    <div class="app-list_wrapper">
      <div v-for="(item, index) in apps" :key="index"  class="app-item_box" @click="openAppItem(item)">
        <el-row class="item-body_box">
          <el-col :span="8">
            <img v-if="item.img" :src="item.img" class="item-icon" />
            <mds-icon v-else :type="item.icon || 'line-crop'" class="item-icon" />
          </el-col>
          <el-col :span="16" class="item-head_box">
            <h5 class="item-name">{{ item.name }}</h5>
            <p class="item-version">版本：{{ item.version }}</p>
          </el-col>
        </el-row>
        <div>
          <p class="item-description">{{ item.description }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import apps from './apps'

export default {
  name: "img-process-page",
  data() {
    return {
      apps
    };
  },
  created() {},
  methods: {
    openAppItem(item) {
      if (item.path) {
        this.$router.push(item.path)
      }
    }
  },
};
</script>

<style lang="scss" scoped>
.img-process_wrapper {
  height: 100%;
  color: #000;
  h3 {
    padding: 12px 0 20px 0;
  }
  .app-list_wrapper {
    display: flex;
    flex-wrap: wrap;
    .app-item_box {
      width: 300px;
      padding: 24px;
      margin: 0 30px 30px 0;
      border: 1px solid #cad2dd;
      border-radius: 8px;
      cursor: pointer;
      .item-body_box {
        display: flex;
        align-items: center;
        padding-bottom: 26px;
        .item-head_box {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          .item-name {
            font-size: 18px;
            font-weight: normal;
          }
          .item-version {
            font-size: 14px;
            padding-top: 10px;
          }
        }
        .item-icon {
          font-size: 56px;
          width: 56px;
          height: 56px;
        }
      }
      .item-description {
        font-size: 14px;
      }
    }
  }
}
</style>
